#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    connect(ui->calendarWidget, SIGNAL(selectionChanged()), this, SLOT(on_calendar_changed()));
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::on_calendar_changed()
{
    QDate date = ui->calendarWidget->selectedDate();
    ui->dateEdit->setDate(date);
}
